<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								社区名称：<input type="text" name=""/>
							</li>
							<li>
								电梯名称：<input type="text" name=""/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
				<div class="select-list">
				<ul>
					<li class="select-time">
						<input type="text" id="selectMonth" name="selectMonth" placeholder="保养月份"  autocomplete="off"/>
					</li>
					<li>
						<a class="btn btn-primary btn-edit btn-xs disabled" onclick="$.operate.editWin(800,500)" shiro:hasPermission="system:user:edit">
							<i class="fa fa-edit"></i> 保养设置
						</a>
					</li>
				</ul>
				</div>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('business:upkeepPlan:edit')}]];
        var removeFlag = [[${@permission.hasPermi('business:upkeepPlan:remove')}]];
        var prefix = ctx + "business/upkeepPlan";

        $(function() {
            var data = [[${fieldList}]];
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "电梯保养计划",
				search: false,
		        showExport: true,
                columns: JSON.parse(data)
            };
            $.table.init(options);


            <!-- laydate示例 -->
            layui.use('laydate', function(){
                var laydate = layui.laydate;

                laydate.render({
                    elem: '#selectMonth',
                    type: 'month',
                    done:function(value,data){
                        createMenuItem(prefix + "?selectMonth="+value,"保养计划："+value);
                    }
                });
            });

        });
    </script>
</body>
</html>